<?=form_open(uri_string());?>
<table class="form">
    <tr>
        <td class="w150 label required"><?=lang('banner.type');?></td>
        <td>
            <select name="banner_type" id="banner_type" style="width:250px;">
                <option value=""><?=lang('banner.choose_type');?></option>
                <?php foreach($list_banner_type as $banner_type){?>
                    <option value="<?=$banner_type->code?>" <?=($rs->banner_type==$banner_type->code)?'selected="selected"':'';?>><?=$banner_type->name?></option>
                <?php } ?>
            </select>
        </td>
    </tr>
    <tr>
        <td class="w150 label"><?=lang('name');?></td>
        <td><input type="text" name="lb_title" id="lb_title" class="w300"  value="<?=$rs->lb_title;?>"></td>
    </tr>
    <tr>
        <td class="w150  label"><?=lang('link');?></td>
        <td><input type="text" name="lb_url" id="lb_url" class="w300" value="<?=$rs->lb_url;?>"></td>
    </tr>
    <tr>
        <td class="w150 label required"><?=lang('image');?></td>
        <td>
            <a class="lib_img" href="javascript:void(0);" onClick="imgLib.openLib({width:'663',height:'300',return_tag:'lb_image',action:'imgcrop'});" title="<?=lang('add_file');?>"></a>
            <div class="lb_image">
                <input type="hidden" name="lb_image" class="w350" value="banner/<?=$rs->lb_image;?>" id="lb_image">
                <a href="javascript:void(0);" onClick="imgLib.openLib({dir_img:'banner/<?=$rs->lb_image;?>',width:'663',height:'300',method:'imgcrop',return_tag:'lb_image',action:'imgcrop'});">
                    <img src="<?=base_url_site().'uploads/banner/'.$rs->lb_image?>" width="100px"/>
                </a>
            </div>
        </td>
    </tr>
    <!--<tr>
        <td class="label required"><?=lang('position');?></td>
        <td><select name="nb_position" id="nb_position" class="w200">
            <? 
				$position = $this->config->item('pos_banner') ;
				for($i=0;$i<count($position);$i++) { 
        	?>
                <option value="<?=$i?>"><?=$position[$i]?></option>
                <? } ?>
            </select></td>
    </tr>
    <script language="javascript">selectoption('nb_position','<?=$rs->nb_position?>');</script>-->
    <tr>
        <td class="w150 label"><?=lang('order');?></td>
        <td><input type="text" name="nb_order" id="nb_order" class="w200" value="<?=$rs->nb_order;?>"></td>
    </tr>
    <tr>
        <td class="label"><?=lang('active_deactive');?></td>
        <td><input type="checkbox" name="bl_active" id="bl_active"  value="1" <?=($rs->bl_active==1)? 'checked="checked"' : ''?>></td>
    </tr>
    <tr>
        <td class="label"></td>
        <td class="footer"><input type="submit" name="bt_submit" class="capnhat"></td>
    </tr>
</table>
<?=form_close();?>
